home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / mdxdos23 / mdxman.txt < prev    next >
Text File  |  1996-07-10  |  68KB  |  1,774 lines

  1. MultiX    Introduction    Chapter 1
  2.  
  3. Introduction
  4.  
  5. MultiX is network software that enables applications on a network or on the 
  6. same computer to exchange information transparently, independently of  the 
  7. hardware platform or operating system used to run the applications and 
  8. independently of the communications protocol used.
  9.  
  10. Who Should Use MultiX? 
  11. MultiX is for organizations that operate networks that incorporate more 
  12. than one hardware platform, operating system, communications medium or 
  13. protocol.
  14.  
  15. Getting to Know MultiX 
  16. MultiX approaches networking from a unique perspective, called process-
  17. oriented networking.  Understanding  process-oriented networking will help 
  18. you get the most benefit from MultiX.
  19.  
  20. MultiX    - Process-oriented Network Software
  21. Unlike other network software packages which provide network services for 
  22. computers and peripherals, MultiX provides network services for processes.  
  23. MultiX is a processes network, rather than a computer network.
  24.  
  25. Why MultiX is Process-oriented 
  26. Thanks to its process orientation, MultiX delivers unparalleled portability 
  27. and transparency between applications operating under one or more 
  28. operating systems, hardware platforms and communications protocols.
  29.  
  30. How Developers Use MultiX 
  31. The application developer uses MultiX by writing a MultiX event handler 
  32. for each process in the application.  The MultiX network software manages 
  33. message exchange using the event handlers written by the application 
  34. developer.
  35.  
  36. In a network connecting many operating systems and communications 
  37. protocols, developers using traditional network software need to write many 
  38. lines of code for each operating system and communications protocol.  
  39. Under MultiX, a short series of commands is sufficient no matter how 
  40. complex the network.
  41.  
  42. MultiX Simplifies System Development 
  43. MultiX allows you to implement and modify your network without affecting 
  44. how applications on your network share data or computing resources.  
  45. Under MultiX, you can freely mix and match hardware platforms, 
  46. communications hardware, link level protocols (if needed), transport level 
  47. protocols, queue and message management, and application 
  48. synchronization and flow control methods.
  49.  
  50. Example 
  51. Under traditional network software, if NetBIOS support was added to 
  52. TCP/IP, all applications using TCP/IP sockets would have to be partially or 
  53. totally rewritten because of the difference between TCP/IP and NetBIOS.  
  54. Under MultiX, applications will be able to use the new network features 
  55. with no development effort at all.
  56.  
  57.  
  58. Developing Open, Distributed Applications 
  59. MultiX speeds and simplifies development of open, distributed applications 
  60. that are relatively resilient to changes in the network environment. 
  61. When developing distributed applications using the MultiX development 
  62. tool kit, MultiX handles all Inter Process Communications (IPC) and frees 
  63. the developer from an array of problems, including incompatibilities 
  64. between operating systems, communication protocols and message flow 
  65. control.
  66.  
  67. Transparently Supports Wide Array of Software and Hardware
  68. After implementing MultiX, you can freely add hardware and software to 
  69. your network.  New applications will be able to share resources with 
  70. existing applications, with no need for special support.  MultiX supports a 
  71. wide array of software and hardware including :
  72.  
  73. Oprating Systems :
  74. MS-DOS, MS-WINDOWS, MS-WINDOWS NT, OS/2 2.x, SCO UNIX.
  75.  
  76. Transport Protocols:
  77. OS/2: Named Pipes, Tcp/Ip, NetBios, Async , X25.
  78. UNIX: Tcp/Ip, Async, X25, Ipx/Spx .
  79. DOS: NetBios, Async, Ipx/Spx.
  80. WINDOWS: NetBIOS, Async, Tcp/Ip (WINSOCK).
  81. WINDOWS NT: NetBios, Async, Ipx/Spx, TcpIp,Named Pipes.
  82.  
  83. System Development Under MultiX - Core Issues
  84.  
  85. Identifying Processes Using a Unique ID
  86.  
  87. After a process is assigned a unique MultiX ID, it can be moved to any 
  88. computer in the network without affecting any other process in the network. 
  89. Coding for Portability 
  90. MultiX hides all specific operating system services from the developer, 
  91. making application code portable to any other platform supported by 
  92. MultiX.  MultiX supplies timers and memory management routines which 
  93. typically are operating system dependent.
  94.  
  95. No Need to Code for Specific Transport Protocols 
  96. Since MultiX is built as a layered system, all interactions with lower layer 
  97. protocols are hidden from the application.  The application developer is 
  98. provided with one set of Application Programming Interfaces (APIs) 
  99. regardless of the protocol being used. 
  100. In non-DOS environments, MultiX does not interact directly with the 
  101. hardware but rather with operating system services and with Transport 
  102. Layer providers.  Operating systems and transport protocols are transparent 
  103. to most of MultiX.   In DOS environments, where there is no support for 
  104. asynchronous lines, MultiX interacts directly with the hardware. 
  105.  
  106.  
  107. What MultiX Does
  108.  
  109. MultiX Versus Traditional Network Software 
  110. If traditional network software sorts and moves messages much like old-
  111. fashioned telephone systems , sending messages with operator (or
  112. developer) assistance , MultiX sorts and moves messages much like a
  113. person-to-person phone call, with no developer assistance required. 
  114. MultiX enables a process, wherever it is located to communicate with 
  115. another process in any other location.  Where traditional network software 
  116. routes communication from computer A to computer B (refer to Figures 1.1 
  117. and 1.2), MultiX routes communications from computer A, process 4 to 
  118. computer B, process 3 (refer to Figures 1.3 and 1.4). 
  119.  
  120.  
  121.   
  122. Figure 1.1  A Traditional  Network 
  123.  
  124.   
  125. Figure 1.2  Conventional Network Software 
  126.  
  127.   
  128. Figure  1.3  A MultiX Network 
  129.   
  130. Figure    1.4  MultiX Communication
  131.  
  132. Client/Server Under MultiX 
  133. MultiX supports client and server connections.  In server connections 
  134. MultiX "listens" to incoming calls.  In client connections MultiX initiates 
  135. contact. 
  136. Regardless of the transport protocols, MultiX can implement both 
  137. connection types on the same link.  MultiX-based networks do not require a 
  138. strict division between clients and servers.  In fact, each process may serve 
  139. as client and server over multiple active links (of the same or different 
  140. types) simultaneously.
  141.  
  142. Network Features
  143.  
  144. Session Management 
  145. When any two processes are connected by a MultiX Session, they may 
  146. communicate.  Any process may have an active MultiX Session with one or 
  147. more processes at any time.
  148.  
  149. Transport Services 
  150. Once a session exists between two processes, the processes may transfer 
  151. data.  The MultiX API provides reliable message transfer for large messages 
  152. or files, regardless of the network protocol or operating system.  MultiX 
  153. provides reliable transfer even across sessions, meaning that no data is lost 
  154. in case of link failure.
  155.  
  156. Rerouting Services 
  157. MultiX automatically reroutes communications for optimal throughput.  If 
  158. there is no direct link between processes, MultiX transparently reroutes 
  159. sessions and messages between the processes.  In fact, two processes may 
  160. exchange information through a third process without interfering with the 
  161. third process and without requiring special programming to the 
  162. communicating processes. 
  163.   
  164. Figure 1.5  Dynamic Load Balancing 
  165.  
  166. Fault Tolerance and Dynamic Load Balancing 
  167. MultiX can connect two processes by more than one physical link, using all 
  168. links simultaneously to maximize throughput. 
  169. Rather than assigning each process statically to a communications line, 
  170. MultiX operates with dynamic load balancing.  By using dynamic load 
  171. balancing (see Figure 1.5) MultiX ensures that message traffic flows 
  172. through any available link.  In the event of link failure, data continues to 
  173. flow on remaining links.  MultiX ceases to transmit only when all links fail. 
  174. Where a direct link exists between two processes, MultiX transmits 
  175. messages via the direct link.  If the direct link fails, MultiX resorts to 
  176. indirect links.  Recovery from link and even controller failure is transparent 
  177. to the process.
  178.  
  179. Gateway Capability 
  180. MultiX allows you to designate specific processes as "gateways".  Gateway 
  181. processes connect processes to other processes linked to the gateway 
  182. process. 
  183. MultiX can also act as a protocol converter, allowing  a process connected 
  184. to a gateway using one type of link (such as a dial- up asynchronous line) to 
  185. communicate with another process connected to the gateway using another 
  186. type of link (such as TCP/Ip).
  187.  
  188. Preemptive Prioritized Message Queues 
  189. MultiX allows you to assign different priorities to different messages issued 
  190. by different applications.  MultiX manages transmission queues on a 
  191. priority basis, rather than on a first in first out basis. 
  192. MultiX messages are preemptive.  This means that when a higher priority 
  193. message arrives at a MultiX transmission queue, MultiX divides the 
  194. message into blocks and transmits the blocks before any block of lower 
  195. priority messages.  If the higher priority message interrupts transmission of 
  196. blocks of a lower priority message, MultiX resumes transmitting the lower 
  197. priority message after transmitting all higher priority messages.
  198.  
  199. ------------------------------------------------------------------------------
  200.  
  201. MultiX    MultiX Objects    Chapter 2
  202.  
  203. MultiX Objects
  204.  
  205. MultiX Object Oriented Programming
  206.  
  207. MultiX is an object oriented programmer's tool kit.  Each MultiX object is 
  208. self-contained, having all of the logic it needs in order to do its job.  
  209. Because MultiX is an object oriented tool kit, the MultiX programmer need 
  210. not concern himself with the task to be performed, which is handled by the 
  211. object itself, but rather with the object, and what MultiX does with the 
  212. object. 
  213. MultiX recognizes five objects: links, processes, messages, events and 
  214. timers.
  215.  
  216. *    MultiX Links ─ MultiX handles interfacing with existing 
  217. communications protocols, controlling links and routing.  After 
  218. defining the link parameters, all communications functions are 
  219. completely transparent to the programmer except for opening and 
  220. closing links, and checking link status. 
  221. As MultiX releases support for new communication protocols, you need 
  222. not change your MultiX code servicing the network.  Just install the 
  223. updated version of MultiX.
  224.  
  225. *    MultiX Processes ─ MultiX processes are objects exchanging 
  226. information using MultiX.  After defining the process parameters, all 
  227. message exchange functions are completely transparent to the 
  228. programmer except for initiating communication with the process.  
  229. MultiX is indifferent to the function performed by the process.
  230.  
  231. *    MultiX Messages ─ MultiX handles message blocking and routing.  
  232. All message blocking and routing functions are completely transparent 
  233. to the programmer.  The programmer only needs to instruct the 
  234. application to create and send the message.  MultiX is indifferent to 
  235. message content.
  236.  
  237. *    MultiX Events ─ MultiX applications are event-driven.  Application 
  238. events are the main concern of the developer.  Once the MultiX event 
  239. handler is written for an application, the event handler deals with any 
  240. event as it occurs.
  241.  
  242. *    MultiX Timers ─ MultiX timers are set by the application.
  243.  
  244. Important Note 
  245. MultiX was developed in C, and MultiX Objects, Structures, Types, and 
  246. Application Programming Interface (API) are in C.  This manual is directed 
  247. primarily at C programmers. 
  248.  
  249.  
  250. MultiX Links 
  251. MultiX Links are the physical communications links between MultiX 
  252. applications (refer to Figure 2.2). 
  253.   
  254. Figure    2.1
  255.  
  256. Defining and Using Links 
  257. A link can be an asynchronous port ("COMx") on a DOS-based PC, or 
  258. "/dev/ttyxx" on a UNIX machine.  It can be a named pipe on OS/2 or a 
  259. socket address on a TCP/IP network.  Each link is defined in MultiX by the 
  260. parameters specified in the link description.  Once the link parameters are 
  261. defined, the programmer need only call MdxOpenLink. 
  262. After specifying link parameters and opening the link, MultiX assumes full 
  263. responsibility for transmission over the link, and the programmer need not 
  264. refer to the link again, except to close the link or check the link status.  
  265. MultiX takes full responsibility for link management and link integrity. 
  266. Every link in MultiX has a link type which must be defined.  MultiX link 
  267. attributes are presented with the structure: TMdxLinkParams, as explained 
  268. in Chapter 4.
  269.  
  270. When to Open a Link 
  271. Before transferring data, the programmer must open a link using the 
  272. MdxOpenLink call, defining the link as available for MultiX 
  273. communication, regardless of which application is on the other side of the 
  274. link.  MultiX and processes on one side of a link do not "know" in advance 
  275. of opening links what processes are on the other side of a link.
  276.  
  277. Important Information! 
  278. A MultiX process may use more than one link of any type at any time.
  279.  
  280. Links in Multitasking Systems 
  281. On multitasking operating systems, such as UNIX and OS/2, only processes 
  282. configured as "gateway processes" (refer to MultiX Processes in this 
  283. chapter) need to open links, the rest of the processes access links to the 
  284. "outside" world through the gateway.
  285.  
  286. MultiX Processes 
  287. As opposed to a MultiX link which is always physical, a MultiX process is 
  288. conceptual or logical.  A process can be an MS-DOS TSR, or an application 
  289. in MS-DOS, MS-Windows, OS/2 or UNIX.  MultiX provides the 
  290. mechanism for processes to "talk" to other processes regardless of the 
  291. location of the process and the operating system under which it is running.
  292.  
  293. Identifying MultiX Processes 
  294. Each MultiX-based process has a unique MultiX ID.  In order for one 
  295. process to communicate with another process, the calling process only needs 
  296. to know the MultiX ID of the receiving process.  The calling process need 
  297. not know where the receiving process is located or what link type the 
  298. receiving process uses. 
  299. Each process, on startup, identifies itself to MultiX by calling MultiXStart.  
  300. Among other things, when a process calls MultiXStart it:  
  301. *    Notifies MultiX of its ID in the MultiX Network. 
  302. *    Gives MultiX a short description of its purpose. 
  303. *    Tells MultiX whether it wants to be a MultiX Gateway. 
  304. Each machine can have at most one Gateway process active at any 
  305. time.  A Gateway process is a regular process except it receives 
  306. notification from other Gateways about new processes and about 
  307. deleted processes.  A MultiX Gateway has full knowledge about all 
  308. processes in a MultiX network, enabling  MultiX Gateways to provide 
  309. rerouting services to other processes.  For example if Process "A" on an 
  310. OS/2 machine is configured as Gateway and it is connected to Process 
  311. "B" using an Async Line, and to process "C" using TCP/Ip, once these 
  312. links are active, process "C" can communicate with process "B" 
  313. through process "A" although there is no physical link between Process 
  314. "B" and Process "C".
  315.  
  316. Communicating Between Processes 
  317. When one process needs to communicate with another process it uses 
  318. MdxConnectProcess.  Once the calling process initiates a connection, it 
  319. can issue data transfer calls before the connection is actually established 
  320. because MultiX queues all requests for data transfer until a session is 
  321. established.  Then MultiX transmits all messages to the other process. 
  322. No data transfer can take place between processes until a session is 
  323. established.  Sessions are logical connections, not physical connections.
  324.  
  325. Establishing a Session 
  326. A session is established when: 
  327. 1    The originating process calls MdxConnectProcess. 
  328. 2    The event manager (MultiX itself) notifies the receiving process of the call request.
  329. 3    The receiving process replies to MdxConnectProcess with MdxAcceptProcess.
  330.  
  331. The receiving process can refuse the session by calling MdxRejectProcess.  
  332. When MdxRejectProcess is sent, the originator is notified, all of its queued 
  333. messages are canceled, and no data transfer takes place until another 
  334. connect request is issued and accepted.
  335.  
  336. Recovering from Physical Link Failure 
  337. If the physical link fails in mid-session, the originating process' MultiX 
  338. continues to look for the  receiving process via alternate MultiX routes 
  339. automatically, without involving the application.
  340.  
  341. Ending a Session 
  342.  After the originating process  calls MdxConnectProcess, MultiX 
  343. continuously monitors the called process until the originator calls 
  344. MdxDisconnectProcess.
  345.  
  346. Defining MultiX Process Parameters 
  347. Every process in MultiX has process parameters which must be defined 
  348. with the structure TMdxProcessParams, as explained in Chapter 4.
  349.  
  350. MultiX Messages 
  351. Two processes on a MultiX Network exchange information by sending and 
  352. receiving MultiX Messages.  A MultiX Message is an object which holds 
  353. any type of information up to 2 Gbyte in size, unlimited by size restrictions 
  354. imposed by the operating system (such as MS-DOS where a single buffer 
  355. can be no longer than 64K bytes).  A MultiX message may be a file, data, or 
  356. a material generated by the process.
  357.  
  358. Optimizing Memory Usage 
  359. Since MultiX Messages are special objects, they have a set of APIs that 
  360. handle the internal structure of a MultiX Message.  This enables MultiX to 
  361. implement Messages as virtual objects on MS-DOS where memory is a very 
  362. scarce resource.  If the programmer requests a large block of memory for 
  363. the message, but the message requires only a small amount of memory, 
  364. MultiX allocates the minimum amount of memory needed. 
  365. A MultiX Message can contain information created by the process, or it can 
  366. contain data read from a file when the message was allocated. When a file 
  367. is sent as a message, MultiX transmits the file directly from the disk rather 
  368. than loading the file and then transmitting the file, saving memory.  MultiX 
  369. stores files in virtual memory, transmitting  one block at a time of a file.
  370.  
  371. Hint 
  372. If a large message must be sent, it may be advantageous to store the 
  373. message as a file and send the file, saving memory.
  374.  
  375. Ensuring Message Delivery 
  376. A MultiX Message is the elementary unit of data transfer.  No matter how 
  377. big a message or what it contains, when an application requests to send a 
  378. message, the message is considered as "Sent Successfully" only after all 
  379. blocks of the message arrive at the final destination.  Until all message 
  380. blocks are received, MultiX keeps track of every block of the message.  In 
  381. case of link or gateway failure, MultiX will recover and send each message 
  382. from the point where it was interrupted.
  383.  
  384. Blocking and Deblocking Messages 
  385. A MultiX Message can theoretically be any size up to 2 GB.  The 
  386. application developer does not need to write code for blocking and 
  387. deblocking of messages, or code for managing message queues.  MultiX 
  388. handles all message blocking and deblocking functions as well as message 
  389. queue management.
  390.  
  391. MultiX Message Life Cycle 
  392. Every MultiX message has a life cycle.  A message must be created, then 
  393. filled with data (just like someone writing a letter must first get a blank 
  394. sheet of paper before beginning to write).  The message is then blocked and 
  395. sent. 
  396. On the receiving end, a message is created, the blocks which comprise the 
  397. message appended to the new message and read.  The receiving MultiX 
  398. acknowledges receipt to the sending MultiX, and forwards the message to 
  399. the application. 
  400. The message on the sending side may now be deleted, or, if the sender 
  401. requested, the message may be deleted after the receiving application 
  402. responds.  Finally, the receiver acts upon the message and deletes the 
  403. message. 
  404. The receiver has a variety of ways to acknowledge receipt of the message.  If 
  405. the sender did not request a response (such as in a broadcast), the receiver 
  406. need not take any action. 
  407. The sender may require an explicit response from the receiver, (either in the 
  408. form of MdxReply, MdxReplyWithData, or MdxReplyWithMessage).  
  409. Once the reply is received the sender is free to delete the message. 
  410. The sender may require confirmation from the receiving MultiX that the 
  411. message was received.  The sender may also request to be notified if the 
  412. message can not be delivered, as in  the case of link failure, or if the 
  413. receiving application is inaccessible. 
  414. The end of the message lifecycle depends on the options selected by the 
  415. sender.  MultiX always acknowledges receipt of the message to the sender.  
  416. For More Information Specific APIs relating to MultiX messages are dealt
  417. with in Chapter 3, The MultiX API.
  418.  
  419. MultiX Events 
  420. A MultiX event occurs whenever something in a MultiX network must react 
  421. to something else.  For example, when an application receives a message, a 
  422. MdxEvDataMsgReceived occurs.  This can be thought of as a telephone in 
  423. a hotel.  When a guest receives a message, the light on the phone in the 
  424. guests room begins to blink.
  425.  
  426. Event-driven Applications 
  427. MultiX applications are event-driven.  Once an application has been 
  428. initialized it passes control to MultiX and from then on the application is 
  429. totally driven by MultiX initiated events.  The application does nothing 
  430. until a MultiX event reaches its event handler (MultiX events are listed and 
  431. explained in Chapter 4).  In turn, if MultiX has nothing to do, it passes 
  432. control to the operating system, wasting no resources.  Once the 
  433. application's event handler is activated, control remains with the application 
  434. until the application returns control to MultiX.  While in the event handler, 
  435. the application may call either operating system or MultiX routines.
  436.  
  437. The Event Handler 
  438. The interface between MultiX applications and MultiX is the application's 
  439. event handler.  The event handler is a user-supplied part of the application.  
  440. The event handler is analogous to a "dispatcher".  When "confronted" with 
  441. an event, the event handler "sends out" (calls) routines to handle the event, 
  442. just as a dispatcher sends out workers to deal with events that have been 
  443. brought to his attention.   
  444. Every MultiX event invokes the event handler routine, and passes it a 
  445. pointer to the event data or context, using the TMdxEvent structure (as 
  446. explained in Chapter 4).
  447.  
  448. MultiX Timers 
  449. A MultiX timer is exactly like an alarm clock.  Once the timer has been set, 
  450. the application continues its work.  After the timer expires, MultiX informs 
  451. the application by sending an MdxTimerEvent to the application's event handler.
  452. An application may set as many timers as necessary.   
  453. Note 
  454. Times in MultiX are always indicated in   1/100  ths of seconds.
  455.  
  456. ------------------------------------------------------------------------------
  457.  
  458. MultiX    MultiX    API Chapter 3
  459.  
  460.  
  461. The MultiX ApplicationProgramming Interface (API)
  462. -------------------------------------------------
  463.  
  464. MultiX is implemented as a set of user library routines which must be 
  465. linked to the application's object code. To access the services provided by
  466. MultiX, an application must use the MultiX API. MultiX has a simple set
  467. of  APIs that are identical for all MultiX supported platforms.  An 
  468. application using the MultiX API is portable and source compatible among 
  469. platforms and operating systems. Portability is guaranteed only with respect
  470. to services provided by MultiX.  Operating system specific calls for other 
  471. tasks, they may not be portable.
  472.  
  473. Note
  474. ----
  475. MultiX was developed in C, and MultiX Objects, Structures, Types, and 
  476. Application Programming Interface (API) are in C.  This manual is directed 
  477. primarily at C programmers.
  478.  
  479. Note
  480. ----
  481. Times in MultiX are always indicated in 1/100 ths of seconds.
  482.  
  483. Note
  484. ----
  485. All error messages of type TMdxApplError are found in the multix.h included on
  486. the installation diskette.
  487.  
  488.  
  489. MdxAcceptProcess 
  490. MdxRejectProcess
  491. ----------------
  492. Function
  493. --------
  494. MdxAcceptProcess is the response of a process to the event 
  495. MdxEvCallReqReceived where the receiving process wants to 
  496. communicate with the calling process.  If the receiving process does not 
  497. want to communicate with the caller, it would send MdxRejectProcess.
  498.  
  499. Syntax
  500. ------
  501. TMdxApplError    MdxAcceptProcess(TMdxProcId ProcId, 
  502.                                 TMdxPassword * Password)
  503. TMdxApplError    MdxRejectProcess(TMdxProcId ProcId, 
  504.                                 TMdxCallError CallError)
  505. Parameters
  506. ----------
  507. ProcId            The ID number of the calling process
  508. Password        Password expected by the caller to verify that the right process
  509.                 was called.  A null pointer means no password.
  510. CallError        Error code explaining the reason for rejecting the call.
  511.  
  512. Return Value
  513. ------------
  514. MdErrInvalidProcId    Invalid process ID specified.
  515.  
  516. MdErrNoMemory        MultiX was unable to allocate resources for the request.
  517.  
  518. MdxAlloc
  519. MdxCalloc
  520. MdxRealloc
  521. MdxFree
  522. ---------
  523.  
  524. Function
  525. --------
  526. MdxAlloc allocates memory blockss.    MdxCalloc allocates
  527. allocates memory blocks in which the bytes have been initialized to binary 0.
  528. MdxRealloc changes the size of a previously allocated memory block.  
  529. When a block of memory allocated by MdxAlloc, or MdxCalloc is not large 
  530. enough, MdxRealloc first tries to allocate more memory above the 
  531. previously allocated memory.  If there is not enough memory available 
  532. without changing the current memory location, MdxRealloc allocates a 
  533. new location for the memory requested.  
  534. MdxFree frees memory allocated to MultiX.  The parameter Block is a 
  535. pointer to memory previously allocated using MdxAlloc, MdxCalloc or 
  536. MdxRealloc.  The number of bytes freed is the number of bytes specified 
  537. when the memory block was first allocated (or reallocated).
  538.  
  539. Syntax
  540. ------
  541. Void     *    MdxAlloc(UInt32 Size)
  542. Void     *    MdxCalloc(UInt32 Size)
  543. Void     *    MdxRealloc(Void  * Block,UInt32 Size)
  544. Void        MdxFree(Void  * Block)
  545.  
  546. Parameters
  547. ----------
  548. Size        The length of the memory block to be allocated.
  549. Block        A void pointer to the previously allocated memory block, or to the
  550.             memory block to be freed.
  551.  
  552. Return Value
  553. ------------
  554. Pointer to allocated memory block.  If insufficient memory is available, the 
  555. return value will be a null pointer. 
  556. For MdxFree there is no return value.
  557.  
  558. Remarks
  559. -------
  560. MultiX always compiles the steps MdxAlloc, MdxCalloc, and 
  561. MdxRealloc, regardless of whether or not the amount of memory requested 
  562. is too big for the operating system.  If the operating system can not allocate 
  563. this much memory, MultiX returns an error code that not enough memory is 
  564. available.
  565.  
  566. MdxCheckLinkStatus
  567. ------------------
  568. Function
  569. --------
  570. MdxCheckLinkStatus determines if a link with the designated link 
  571. descriptor currently exists or not.  MdxCheckLinkStatus returns an error 
  572. code if the link is inaccessible.
  573.  
  574. Syntax
  575. ------
  576. TMdxApplError    MdxCheckLinkStatus(TLinkDescr LinkDescriptor)
  577.  
  578. Parameter
  579. --------
  580. LinkDescriptor        The descriptor of the link to check as returned by
  581.                     MdxOpenLink in the Ld field in TMdxLinkParams.
  582.  
  583. Return Value
  584. ------------
  585. MdErrNoError            Link is connected and active.
  586. MdErrInvalidLinkLd        Invalid link descriptor specified or if the
  587.                         line has been closed by MultiX because
  588.                         MaxConnectRetries or IdleTimeout as specified in
  589.                         MdxOpenLink has been reached.
  590. MdErrLinkDisconnected    The link is currently disconnected. MultiX will
  591.                         attempt to reconnect.
  592.  
  593.  
  594. MdxCheckProcessStatus
  595. ---------------------
  596. Function
  597. --------
  598. MdxCheckProcessStatus determines if a process with the designated 
  599. process ID exists or not.  MdxCheckProcessStatus returns an error code if 
  600. the process is unavailable, if access has been denied or if the process has 
  601. been disconnected.
  602.  
  603. Syntax
  604. ------
  605. TMdxApplError    MdxCheckProcessStatus(TMdxProcId ProcId)
  606.  
  607. Parameter
  608. ---------
  609. ProcId            The ID number of the process to check.
  610.  
  611. Return Value
  612. -----------
  613. MdErrNoError            Process is ready, and a session exists.
  614. MdErrInvalidProcId        Invalid process ID specified or because no
  615.                         call request was ever made to or received
  616.                         from the process.
  617. MdErrProcessNotReady    No session currently exists with the specified
  618.                         process. MultiX will continuously try to create a
  619.                         session.
  620.  
  621. MdxClrTimer
  622. -----------
  623. Function
  624. --------
  625. MdxClrTimer clears a previously defined MultiX timer, set using 
  626. MdxSetApplTimer before the timer expires.  MdxClrTimer is used when 
  627. the event the application is waiting for has already occurred.
  628.  
  629. Syntax
  630. ------
  631. Void    MdxClrTimer(TTimerId TimerId)
  632.  
  633. Parameter
  634. ---------
  635. TimerId    The MultiX assigned ID of the timer to be cleared as returned 
  636. by MdxSetApplTimer.
  637.  
  638. Return Value
  639. ------------
  640. No return value.
  641.  
  642. Remarks
  643. -------
  644. If an event has already occurred, it is advisable to clear timers related to the 
  645. event rather than wait for the timers to expire, in order to save resources.
  646.  
  647. MdxConnectProcess 
  648. MdxDisconnectProcess
  649. --------------------
  650. Function
  651. --------
  652.  
  653. MdxConnectProcess attempts to create a session with the designated 
  654. process.  If no session is created, MdxConnectProcess continuously 
  655. monitors the process to connect to until the process is found, or until 
  656. MdxDisconnectProcess is called.
  657.  
  658. MdxDisconnectProcess ends a session between two MultiX processes 
  659. created using MdxConnectProcess, or where no session exists, stops 
  660. attempts to create a session.
  661.  
  662. Syntax
  663. ------
  664. TMdxApplError    MdxConnectProcess(TMdxProcessParams * ProcessParams)
  665. TMdxApplError    MdxDisconnectProcess(TMdxProcId ProcId)
  666.  
  667. Parameters
  668. ----------
  669. ProcessParams        Pointer to the desired process' parameters.
  670. ProcId                The ID number of the process with which to end a session
  671.                     or with which to stop attempting to start a session.
  672.  
  673. Return Value
  674. ------------
  675. MdErrNoError        MultiX tries to create a session with the called process.
  676. MdErrNoMemory        MultiX was unable to allocate resources for the request.
  677.  
  678.  
  679. MdxDeleteEvent
  680. --------------
  681. Function
  682. --------
  683. MdxDeleteEvent deletes the event structure passed to the event handler 
  684. after the event occurs.  When the KeepEvent flag in TMdxEvent is set to 
  685. true, events remain in memory until deleted by using MdxDeleteEvent.  
  686. MdxDeleteEvent also deletes any objects pointed to by the Data field
  687. of TMdxEvent.
  688.  
  689. Syntax
  690. ------
  691. Void    MdxDeleteEvent(TMdxEvent * Event)
  692.  
  693. Parameter
  694. ---------
  695. Event            Pointer to the event to be deleted.
  696.  
  697. Remarks
  698. -------
  699. When the event handler returns control to MultiX, MultiX deletes the event, 
  700. its resources and pointers.  If the application wants to save the event for 
  701. future use, it should set the KeepEvent flag in TMdxEvent to True proir to 
  702. returning from the event handler.  When there is no further use for the 
  703. event, the application should delete the event.
  704.  
  705.  
  706. MdxGetApplTimerInfo
  707. -------------------
  708. Function
  709. --------
  710. MdxGetApplTimerInfo extracts information about expired timers from the 
  711. Data field of TMdxEvent.  MdxGetApplTimerInfo is used only when the 
  712. MdxTimerEvent event occurs and there is a need to get information
  713. about a specific timer.
  714.  
  715. Syntax
  716. ------
  717. TResult    MdxGetApplTimerInfo(Void  * Data,TMdxTimerInfo    *  TimerInfo)
  718.  
  719. Parameters
  720. ----------
  721. Data        Void pointer to data field found in the event 
  722.             structure for the relevant MdxTimerEvent.
  723. TimerInfo    Pointer to where MultiX stores timer information..
  724.  
  725. Return Value
  726. ------------
  727. Success            Request completed succesfully.
  728. Failure            Data does not point to a valid MultiX timer structure.
  729.  
  730.  
  731. MdxGetCurrTimerValue
  732. --------------------
  733. Function
  734. --------
  735. From the moment that the MultiXStart routine is run, MultiX begins 
  736. counting 1/100 ths of seconds.    MdxGetCurrTimerValue returns the
  737. value of this counter.    This counter is used by MultiX to run MultiX timers.
  738.  
  739. Syntax
  740. ------
  741. TTimer    MdxGetCurrTimerValue(Void)
  742.  
  743. Return Value
  744. ------------
  745. Current timer value.
  746.  
  747.  
  748. MdxGetTime
  749. ----------
  750. Function
  751. --------
  752. MdxGetTime reads the computer's clock and returns the number of seconds 
  753. that have elapsed since 00:00:00 Greenwich Mean Time, 1 January, 1970.
  754.  
  755. Syntax
  756. ------
  757. TMdxTime    MdxGetTime(Void)
  758.  
  759. Return Value
  760. ------------
  761. The current time as indicated by the system clock.  For example, if the 
  762. command MdxGetTime were given on 12:00:00 1 January, 1970 would 
  763. return a value of 43200 sec.
  764.  
  765.  
  766. MdxMsgAppend
  767. MdxMsgRead 
  768. ------------
  769. Function
  770. --------
  771. MdxMsgAppend appends information to the end of the designated message.
  772. MdxMsgRead sequentially reads data blocks from the start of the message 
  773. into memory.  The programmer does not have direct access to message data.  
  774. The only way for the programmer to access message is by appending the 
  775. data to a message, or by reading a message containing the data.
  776.  
  777. Syntax
  778. ------
  779. TResult        MdxMsgAppend(TMdxMsg  * Msg,Void  *Data, TBufSize BufferSize)
  780. TBufSize    MdxMsgRead(TMdxMsg    * Msg,Void    *Data, TBufSize BufferSize)
  781.  
  782. Parameters
  783. ----------
  784. Msg            Pointer to the message to append information to or to read from.
  785. Data        Pointer to where the data to be appended can be found, or where
  786.             to read the data to.
  787. BufferSize    Number of bytes to append from data to the message, or to read
  788.             from the message.
  789.  
  790. Return Value
  791. ------------
  792. MdxMsgRead    returns the number of bytes actually read from the message.
  793.  
  794. MdxMsgAppend returns:
  795.  
  796. Success        Data appended to the message succesfully.
  797. Failure        MultiX was unablle to allocate resources or message has
  798.             reached maximum size specified in MdxMsgNew.
  799.  
  800. Remarks
  801. -------
  802. Before a message can be appended to with MdxMsgAppend, the message 
  803. must have been allocated with MdxMsgNew, or there must be a message 
  804. pointer received using MdxMsgDup for a message created using 
  805. MdxMsgNew.
  806.  
  807. MdxMsgRead is the opposite of MdxMsgAppend.  While 
  808. MdxMsgAppend adds data blocks to the end of a message, MdxMsgRead 
  809. sequentially reads data from the start of the message.
  810.  
  811.  
  812. MdxMsgDelete
  813. ------------
  814. Function
  815. --------
  816. MdxMsgDelete deletes a specified message from memory, whether the 
  817. message was created by MdxMsgNew, MdxMsgNewFile, MdxMsgDup or 
  818. if the message was received from elsewhere. 
  819. When the message was created by MdxMsgDup, only the current pointer to 
  820. the message is deleted, until the last pointer to the message is deleted.  Then 
  821. the actual message is deleted. 
  822. If a message was created using MdxMsgNew, MdxMsgNewFile, and not 
  823. sent, it is advisable to delete the message using MdxMsgDelete.  If a 
  824. message was received from another source, the massage is part of a MultiX 
  825. event structure, and is implicitly deleted by MultiX with the event structure 
  826. on return from the event handler.
  827.  
  828. Syntax
  829. ------
  830. TResult    MdxMsgDelete(TMdxMsg  * Msg)
  831.  
  832. Parameter
  833. ---------
  834. Msg        A pointer to the message to be deleted.
  835.  
  836. Return Value
  837. ------------
  838. Success        Message succesfully deleted.
  839. Failure        Invalid message pointer provided.
  840.  
  841. Remark 
  842. Once a message has been deleted, neither it nor pointer to the message may 
  843. be used again.
  844.  
  845.  
  846. MdxMsgDup
  847. ---------
  848. Function
  849. --------
  850. MdxMsgDup creates a new message by duplicating control information of 
  851. an existing message.  The data of the message is not duplicated.  
  852. MdxMsgDup creates a pointer to the same memory location as the original 
  853. message data.
  854.  
  855. Syntax
  856. ------
  857. TMdxMsg     *    MdxMsgDup(TMdxMsg    * Msg)
  858.  
  859. Parameter
  860. ---------
  861. Msg        A pointer to the message to be duplicated.
  862.  
  863. Return Value
  864. ------------
  865. A pointer to the duplicated message data.  All future references to this 
  866. message should refer to this pointer.  A null pointer is returned in the event 
  867. of insufficient resources .
  868.  
  869. Remarks
  870. -------
  871. Use MdxMsgDup if there is a need to send the same data to multiple 
  872. processes.  Rather than duplicate the message itself, use MdxMsgDup to 
  873. save memory and CPU time. 
  874. Using MdxMsgDup enables sending the same message to many different 
  875. applications, for instance, for broadcast purposes.
  876.  
  877.  
  878. MdxMsgNew
  879. ---------
  880. Function
  881. --------
  882. MdxMsgNew creates a new message.  Once a new message has been 
  883. created, use MdxMsgAppend to append information to the message.
  884.  
  885. Syntax
  886. ------
  887. TMdxMsg     *    MdxMsgNew(TMdxMsgSize Size)
  888.  
  889. Parameter
  890. ---------
  891. Size        A value indicating the maximum allowable size of the message.
  892.             This value need not be exact, since in MultiX memory is
  893.             dynamically allocated as data is appended to the message.
  894.             MultiX optimizes memory allocation based on the value of Size.
  895.             In no case may the actual message length exceed the value of Size.
  896.  
  897. Return Value
  898. ------------
  899. A pointer to the newly created message.  All future references to this 
  900. message should refer to this pointer.  A null pointer is returned in the event 
  901. of insufficient resources.
  902.  
  903. Warning
  904. -------
  905. Because MultiX monitors messages based on pointers and not content, in no 
  906. case should the application issue a send command using the same pointer 
  907. more than once.  If there is a need to send the same message to more than 
  908. one application, the same message should be sent with two different 
  909. pointers using MdxMsgDup().
  910.  
  911.  
  912. MdxMsgNewFile
  913. -------------
  914. Function
  915. --------
  916. MdxMsgNewFile creates a new message where the source of the Message 
  917. is a file.  A header string is added to the message for the use of the 
  918. programmer.  The header allows the programmer to send information 
  919. accompanying the file.  At the receiving side the header data is located 
  920. before file data.
  921.  
  922. Syntax
  923. ------
  924. TMdxMsg     *    MdxMsgNewFile(Int8Ptr Filename,UInt8Ptr Data, 
  925.                                 TSCounter Length)
  926.  
  927. Parameters
  928. ----------
  929. Filename    Name of the file to include as the message. 
  930. Data        Message header. 
  931. Length        Length of data string (up to 64k).
  932.  
  933. Return Value
  934. ------------
  935. A pointer to the newly created message.  All future references to this 
  936. message should refer to this pointer.  A null pointer is returned in the event 
  937. of insufficient resources or if a nonexistant file is specified.
  938.  
  939. Remarks
  940. -------
  941. Files are transmitted by MultiX as embedded files not as linked files.  After 
  942. transmission the source file may be altered without affecting the message.
  943.  
  944.  
  945. MdxMsgSeekRead 
  946. MdxMsgRewindRead
  947. ----------------
  948. Function
  949. --------
  950. MdxMsgSeekRead sets the next location for the next read to occur.  
  951. MdxMsgSeekRead is used if there is a need to read sections of a message 
  952. more than once, or if there is a need to skip portions of a message. 
  953. MdxMsgRewindRead is similar to MdxMsgSeekRead, returning  to the 
  954. beginning message and rereading the message.  Used when there is a need 
  955. to read the message more than once.
  956.  
  957. Syntax
  958. ------
  959. TResult    MdxMsgSeekRead(TMdxMsg    * Msg, TMdxMsgSize OffsetSize,
  960.                         TMdxMsgSeekOrigin SeekOrigin)
  961. TResult    MdxMsgRewindRead(TMdxMsg  * Msg)
  962.  
  963. Parameters
  964. ----------
  965. Msg                Pointer to the message to be reread in part.
  966. OffsetSize        Offset skip size. 
  967. SeekOrigin        Location to skip the offset size from.  May be equal to 
  968.                 TMdxSeekStart, TMdxSeekBack, TMdxSeekFwrd, or TMdxSeekEnd.
  969.                 See Figure 3.1 for a graphic explanation.
  970.  
  971. Return Value
  972. ------------
  973. Success or Failure.
  974.  
  975.  
  976. MdxMsgSizeGet
  977. -------------
  978. Function
  979. --------
  980. MdxMsgSizeGet returns the actual size of the message, which may be less 
  981. than or equal to the message size set in MdxMsgNew.  When a message 
  982. was created using MdxMsgNewFile, MdxMsgSizeGet returns the size of 
  983. the file plus the size of the header.
  984.  
  985. Syntax
  986. ------
  987. TMdxMsgSize    MdxMsgSizeGet(TMdxMsg  * Msg)
  988.  
  989. Parameter
  990. ---------
  991. Msg        Pointer to a message created by MdxMsgNew, 
  992.         MdxMsgNewFile or MdxMsgDup, or received from another MultiX process.
  993.  
  994. Return Value
  995. ------------
  996. The size of the message, or the file plus the size of the header MultiX 
  997. added.    -1 is returned when Msg is not a valid pointer to TMdxMsg.
  998.  
  999.  
  1000. MdxOpenLink 
  1001. MdxCloseLink
  1002. ------------
  1003. Function
  1004. --------
  1005. MdxOpenLink is used by MultiX to create a connection on the link 
  1006. specified using TMdxLinkParams.  MdxOpenLink is called only once by
  1007. an application to open a MultiX link.  Once the link is opened, the 
  1008. application does not refer to the link except to close the link, using 
  1009. MdxCloseLink, or to check for  breaks in the link using 
  1010. MdxCheckLinkStatus.
  1011.  
  1012. MdxCloseLink closes a MultiX link, disabling MultiX from using the link 
  1013. in future communications.  In order to use a link closed with 
  1014. MdxCloseLink, MdxOpenLink must be called to reopen the link.
  1015.  
  1016. Syntax
  1017. ------
  1018. TMdxApplError    MdxOpenLink(TMdxLinkParams  *  LinkParams) 
  1019. TMdxApplError    MdxCloseLink(TLinkDescr LinkDescriptor)
  1020.  
  1021. Parameters
  1022. ----------
  1023. LinkParams        Pointer to the link parameters.
  1024. LinkDescriptor    The description of the link to be closed, as returned by 
  1025.                 MdxOpenLink in the Ld field in TMdxLinkParams as explained in
  1026.                 Chapter 4.
  1027.  
  1028.  
  1029. Return Value
  1030. ------------
  1031. MdErrNoError    Operation succesfully completed.
  1032.  
  1033.  
  1034. For MdxOpenLink :
  1035.  
  1036. MdErrLinkAlreadyOpened        Returned when the link to be opened has already
  1037.                             been opened.  This is a warning,and not an error.
  1038.  
  1039. MdErrUnableToOpenLink        Invalid link parameters specified. Usually
  1040.                             indicates that the link name specified is not valid.
  1041.  
  1042. MdErrLinkTypeNotSupported    The LinkType Specified is not supprted.
  1043. MdErrNoMemory                MultiX was unable to allocate resources.
  1044.  
  1045.  
  1046. For MdxCloseLink :
  1047. MdErrLinkClosed                Returned when the link has already been
  1048.                             successfully closed.
  1049.  
  1050. Remarks
  1051. -------
  1052. MdxOpenLink is usually called only once per link, but can be called more 
  1053. if the link is explicitly closed by MdxCloseLink, or if the link is implicitly 
  1054. closed by MultiX if connect retries fail to reopen the link.  To find out if the 
  1055. link exists or not, use MdxCheckLinkStatus. 
  1056. If the return value of MdxOpenLink is MdErrNoError, the Ld field in
  1057. TMdxLinkParams contains a value assigned by MultiX to be used in 
  1058. future references to the link.
  1059.  
  1060.  
  1061. MdxSendMsg 
  1062. MdxReply
  1063. MdxReplyWithData
  1064. MdxReplyWithMsg
  1065. MdxSendData
  1066. ----------------
  1067. Function
  1068. --------
  1069. MdxSendMsg            Sends a message from one process to another.
  1070. MdxReply            Confirms receipt of the message.
  1071. MdxReplyWithData    Sends a response to a message that contains data less than
  1072.                     64 kbytes long.
  1073. MdxReplyWithMsg        Sends a response to a message containing a message more than
  1074.                     64 kbytes long.
  1075. MdxSendData            Used to send a message of less than 64 kbytes from one
  1076.                     process to another.
  1077.  
  1078. Syntax
  1079. ------
  1080. TMdxApplError    MdxSendMsg(TMdxProcId ProcId, TMdxMsg  * Msg,TMdxMsgCode MsgCode,
  1081.                             TMdxMsgPri MsgPri, TMdxSendAttr MsgAttr,
  1082.                             TReqSeq RequestSequence,TTimer Timeout)
  1083.  
  1084. TMdxApplError    MdxReply(TMdxSRMsgInfo    * MsgInfo, TMdxError Error)
  1085.  
  1086. TMdxApplError    MdxReplyWithData(TMdxSRMsgInfo    * MsgInfo, TMdxError Error,
  1087.                                     Void  * Data,TBufSize DataSize,
  1088.                                     TMdxMsgCode MsgCode,TMdxMsgPri MsgPri,
  1089.                                     TMdxSendAttr MsgAttr, TReqSeq RequestSequence,
  1090.                                     TTimer Timeout)
  1091.  
  1092. TMdxApplError    MdxReplyWithMsg(TMdxSRMsgInfo  * MsgInfo, TMdxError Error,
  1093.                                 TMdxMsg  * Msg,TMdxMsgCode MsgCode,
  1094.                                 TMdxMsgPri MsgPri,TMdxSendAttr MsgAttr,
  1095.                                 TReqSeq RequestSequence,TTimer Timeout)
  1096.  
  1097. TMdxApplError    MdxSendData(TMdxProcId ProcId,Void    * Data, TBufSize DataSize,
  1098.                             TMdxMsgCode MsgCode,TMdxMsgPri MsgPri,
  1099.                             TMdxSendAttr MsgAttr,TReqSeq RequestSequence,
  1100.                             TTimer Timeout)
  1101.  
  1102. Parameters
  1103. ----------
  1104. ProcId            The process ID number of the receiving process.
  1105. Msg                Pointer to the message to be sent.
  1106. MsgCode            A short integer arbitrarily assigned by the user.  The message
  1107.                 code is not for MultiX's use but for the receiver.  It is
  1108.                 advisable that the values of message codes be known to both sides
  1109.                 before communication begins.
  1110. MsgPri            A positive short integer.  Lower values indicate higher
  1111.                 priorities, where 0 is the highest priority.  The lower the
  1112.                 value of the message priority the sooner MultiX deals with the
  1113.                 message.
  1114. MsgAttr            A flag defining the confirmation required from the receiver
  1115.                 upon receipt of the message.  See remarks for possible values
  1116.                 of TMdxSendAttr.
  1117. RequestSequence    User defined long integer which uniquely identifies the 
  1118.                 message.  Since the same message code may be used a number of
  1119.                 times the request sequence may be used by the programmer to
  1120.                 distinguish the message as unique.
  1121. Timeout            Amount of time the application alots to the receiver from the
  1122.                 time the message is received to the time one of the MdxReply...
  1123.                 routines is called.    Failure to respond with MdxReply... generates
  1124.                 an event causing the message on the sender's side to be terminated.
  1125. MsgInfo            A pointer to message found in the Data field of TMdxEvent
  1126.                 where the event code is MdxEvDataMsgReceived.
  1127. Error            Comment on messages received used in responses.
  1128. Data            A void pointer to the data to be sent.
  1129. DataSize        The size of the data to be sent.
  1130.  
  1131.  
  1132. Return Value
  1133. ------------
  1134. MdErrNoError                the operation completed successfully.
  1135. MdErrMsgIsEmpty             indicated that the message contains no information.
  1136. MdErrInvalidReplyInfo        indicates that the reply information does not
  1137.                             correspond to the sender of the message.
  1138. MdErrDataReplyNotAllowed    indicates that a reply containing data was
  1139.                             sent where a data reply is not allowed.
  1140.  
  1141. Remarks
  1142. -------
  1143. Before a message or data may be sent between processes, there must at least 
  1144. be an attempt to start a session between them.  The actual message transfer 
  1145. may only begin when the "accept" has been received, which actually starts 
  1146. the session.  If an attempt was made to start the session, but there was no 
  1147. "accept", MultiX queues the message until the session exists. 
  1148. A reply is a response to a previously sent message, and never an unsolicited 
  1149. message. The only information conveyed by MdxReply is confirmation of receipt of
  1150. the message.  If a more detailed reply is needed, MdxReplyWithData or 
  1151. MdxReplyWithMsg should be used.
  1152.  
  1153. MdxSendData is used like MdxSendMsg, except that the message sent is 
  1154. less than 64 kbytes long, and the resulting code to be written is shorter.  For 
  1155. example, using    MdxSendMsg three steps of programming are needed to send a
  1156. short message:
  1157. ...
  1158. Msg = MdxMsgNew(1000);
  1159. MdxMsgAppend(Msg,"Send Lunch",10);
  1160. MdxSendMsg(...);
  1161. ...
  1162. Using MdxSendData, only one line of programming is employed:
  1163. ...
  1164. MdxSendData(ToFred,"Send Lunch",10,...);
  1165. ...
  1166.  
  1167. The parameter TMdxSendAttr is a bit mapped integer expression formed 
  1168. by combining one or more of the following manifest constants.  When more 
  1169. than one manifest constant is given, the constants are joined by the bitwise 
  1170. OR operator (|).
  1171.  
  1172. Constant                    Meaning
  1173. --------                    -------
  1174.  
  1175.  
  1176. MdxResponseRequired            MultiX waits for an explicit reply from the
  1177.                             application, sent with either MdxReply or MdxReplyWithData
  1178.                             or MdxReplyWithMsg.
  1179.  
  1180. MdxReportSuccess            MultiX on the sender's side waits until MultiX on
  1181.                             the receiver's side confirms that the message
  1182.                             has been received.
  1183.  
  1184. MdxReportError                MultiX notifies the sender if the message can not
  1185.                             be sent. Either the receiving process is inaccessible
  1186.                             or the link has broken.
  1187.  
  1188. MdxResendOnRestart            If the receiver disappears during transmission MultiX
  1189.                             resends the message when the receiver restarts.
  1190.  
  1191.  
  1192. MdxSetApplTimer
  1193. ---------------
  1194. Function
  1195. --------
  1196. MdxSetApplTimer is used by the application to set a MultiX timer.
  1197.  
  1198. Syntax
  1199. ------
  1200. MdxTimerId    MdxSetApplTimer(Int16 Code,TTimer Time, TTimerTag Tag1,
  1201.                             TTimerTag Tag2,TTimerTag Tag3, TCounter Counter)
  1202.  
  1203. Parameters
  1204. ----------
  1205.  
  1206. Code            User defined timer code.  Used to classify the timer.  Timer
  1207.                 codes can be used to identify timers after timers expire.
  1208.                 The use of timer codes is implementation dependent.
  1209. Time            Amount of time in 1/100 ths of seconds to allocate before the
  1210.                 timer expires.
  1211. Tag1-3            Three user defined 32 bit integer variables that may be used
  1212.                 to provide additional information about the timer. For example,
  1213.                 one tag may be a process ID, another an error code, and the
  1214.                 third a link ID.  These tags may help the programmer distinguish
  1215.                 between timers that have the same timer code.
  1216. Counter            Number of times to use the timer.  If set to ─1, the timer
  1217.                 repeats indefinitely.
  1218.  
  1219. Return Value
  1220. ------------
  1221. An ID for the timer, used to identify the timer for future reference.  In 
  1222. particular, used in MdxClrTimer.
  1223.  
  1224. MdxTimeTo_time_t
  1225. ----------------
  1226. Function
  1227. --------
  1228. Where the operating system does not use 1 January, 1970 as the standard 
  1229. for its clock, MdxTimeTo_time_t converts TMdxTime to a time the 
  1230. operating system recognizes.
  1231.  
  1232. Syntax
  1233. ------
  1234. time_t    MdxTimeTo_time_t(TMdxTime Time)
  1235.  
  1236. Parameter
  1237. ---------
  1238. Time        The time returned by MdxGetTime.
  1239.  
  1240. Return Value
  1241. ------------
  1242. The converted time.
  1243.  
  1244.  
  1245. MultiXStart
  1246. -----------
  1247. Function
  1248. --------
  1249. Every MultiX application must call the MultiXStart routine once to 
  1250. initialize MultiX before beginning any other work with MultiX.
  1251.  
  1252. Syntax
  1253. ------
  1254. Void    MultiXStart(TMdxProcId ProcId,Int8Ptr String,
  1255.                     TMdxStartupAttributes StartupAttributes)
  1256.  
  1257. Parameters
  1258. ----------
  1259. ProcId                The MultiX Process ID of the starting up process,
  1260. String                User defined, free text, up to 23 byte long null terminated string.
  1261. StartupAttributes    A bit mapped integer expression formed by combining 
  1262.                     one or more manifest constants.
  1263.  
  1264. Remarks
  1265. -------
  1266. The parameter StartupAttributes is a bit mapped integer expression formed 
  1267. by combining one or more of the following manifest constants.  When more 
  1268. than one manifest constant is given, the constants are joined by the bitwise 
  1269. OR operator (|).
  1270.  
  1271. Constant                        Meaning
  1272.  
  1273. MdxStartAsGateway                Specifies that the process is defined as
  1274.                                 a MultiX gateway.  Only one MultiX gateway is
  1275.                                 allowed per computer.
  1276. MdxReportAllProcesses            Whenever MultiX detects a transition such as
  1277.                                 the addition of a new process, or a change in
  1278.                                 readiness of a process, MultiX generates an
  1279.                                 event. If this is not specified in startup,
  1280.                                 MultiX does not notify the user of transitions.
  1281.                                 MdxReportAllProcesses is primarily for use by
  1282.                                 gateway processes.
  1283. MdxReportAllLinks                Whenever MultiX detects a transition such as
  1284.                                 the addition of a new link, or a change in
  1285.                                 readiness of a link, MultiX generates an event.
  1286.                                 If this is not specified in startup, MultiX
  1287.                                 does not notify the user of transitions.
  1288.                                 MdxReportAllLinks is primarily for use by
  1289.                                 gateway processes.
  1290.  
  1291.  
  1292. MultiXWaitEvent 
  1293. MultiXCheckEvent
  1294. ----------------
  1295. Function
  1296. --------
  1297. MdxWaitEvent gives MultiX total control of the application until a MultiX 
  1298. event activates the application through the application event handler.  The 
  1299. application performs no activity until an event is passed to the event 
  1300. handler. 
  1301. Unlike MdxWaitEvent, if MdxCheckEvent is called, MultiX returns 
  1302. immediately to the caller if there are no events, giving the application some 
  1303. freedom from MultiX.
  1304.  
  1305. Syntax
  1306. ------
  1307. Void    MultiXCheckEvent(Void) 
  1308. Void    MultiXWaitEvent(Void)
  1309.  
  1310. Remarks
  1311. -------
  1312. CheckEvent and WaitEvent may not be called from within the MultiX event 
  1313. handler. 
  1314.  
  1315. ------------------------------------------------------------------------------
  1316.  
  1317. MultiX    MultiX Structures and Types    Chapter 4
  1318.  
  1319. MultiX Structures and Types
  1320. ---------------------------
  1321.  
  1322. This chapter describes MultiX structures and types used to develop a 
  1323. MultiX based application.  All structures and definitions are found in the 
  1324. file multix.h located in the distribution diskette.  This file must be included
  1325. in the compile unit for compilation to succeed.
  1326.  
  1327. TMdxLinkParams Structure
  1328. ------------------------
  1329.  
  1330. typedef struct TMdxLinkParams 
  1331. {
  1332.     TLinkDescr        Ld;
  1333.     TMdxLinkType    LinkType;
  1334.     TMdxLinkName    LinkName;
  1335.     TBaudRate        LinkBaud;
  1336.     TBoolean        UseDlcFraming;
  1337.     TMdxNetAddr        NetAddr;
  1338.     TSIndex            L2DriverIndex;
  1339.     TSIndex            L3DriverIndex;
  1340.     TMdxLinkStatus    For internal use;
  1341.     TMdxService        Service;
  1342.     TMdxConnectMode    ConnectMode;
  1343.     TTimer            ConnectTimeout;
  1344.     TTimer            ConnectRetriesDelay;
  1345.     TBufSize        L1MaxSendSize;
  1346.     TCounter        MaxConnectRetries;
  1347.     TTimer            IdleTimeout;
  1348.     TTimer            ImAliveInterval;
  1349.     TTimer            PollInterval;
  1350.     TSCounter        MaxPollRetries;
  1351.     TMdxProcId        DefaultProcId;
  1352. }    TMdxLinkParams;
  1353.  
  1354.  
  1355. Fields:
  1356. Ld (Link Descriptor)    Value returned by MdxOpenLink.    To
  1357.                         be used when calling MdxCheckLinkStatus and
  1358.                         MdxCloseLink.
  1359.  
  1360. LinkType                Type of link.  See below for possible values.
  1361.  
  1362. LinkName                Value depends on link type.  See below for possible
  1363.                         values.
  1364.  
  1365. BaudRate                Baud rate for asynchronous lines.  300 to 38k baud.
  1366.  
  1367. UseDLCFraming.            Use DLC framing.    True for Async and TCP/Ip.
  1368.  
  1369. NetAddress                Address in X25 network.  No default.
  1370.  
  1371. L2DriverIndex            Always 0.
  1372.  
  1373. L3DriverIndex            Always 0.
  1374.  
  1375. Service                    MdxLinkTypeAsyncModem - gives modem dialing commands,
  1376.                         such as "ATDP2126581234".
  1377.                         MdxLinkTypeTcpIpSocket - socket name as is found in
  1378.                         the "services" file.
  1379.  
  1380. ConnectMode                Listen or call.
  1381.                         MdxConnectModeListen -    Wait for incoming call.
  1382.                         MdxConnectModeCall - Initiate contact over the link.
  1383.  
  1384. ConnectTimeout            Connect time-out.  Amount of time to wait
  1385.                         for a connection to bestablished.
  1386.                         Default - indefinite.
  1387.  
  1388. ConnectRetriesDelay        Connect retries delay.    Amount of time to wait
  1389.                         between retries.
  1390.  
  1391. MaximumConnectRetries    Maximum connect retries to attempt.
  1392.  
  1393. L1MaxSendSize            On reliable lines such as TCP/Ip use large
  1394.                         values.  On noisy lines use smaller values.
  1395.                         Maximum recommended value is 4k.
  1396.  
  1397. IdleTimeout                A positive number indicating the amount
  1398.                         of time MultiX waits on an idle line until
  1399.                         ending the connection.    When this timer
  1400.                         expires on an idle link, the link is closed
  1401.                         and not reopened by MultiX.  To use the
  1402.                         link again, the application must open the
  1403.                         link again.
  1404.                         For a modem, set this at a low value to
  1405.                         avoid high telephone charges.
  1406.                         0 = do not hang up.
  1407.  
  1408. ImAliveInterval            At this interval MultiX on the sending
  1409.                         side contacts MultiX on the receiving side
  1410.                         to determine that the other side is still
  1411.                         alive.    If an answer is received to this
  1412.                         query, MultiX takes no action.    If no
  1413.                         answer is received, MultiX notifies the
  1414.                         process using this link.
  1415.                         0 = disabled.
  1416.  
  1417. PollInterval            At this interval of seconds MultiX asks the
  1418.                         receiver to verify what has been received.
  1419.                         Default 300.
  1420.  
  1421. MaximumPollRetries        If after this amount of retries no
  1422.                         verification of receipt is received MultiX
  1423.                         assumes the receiving side is dead.
  1424.                         Default 5.
  1425.  
  1426. DefaultProcessId        Always 0.
  1427.  
  1428.  
  1429. ConnectTimeOut, ConnectRetriesDelay, and MaximumConnectRetries
  1430.  
  1431. The fields connect time out, connect retries delay and maximum connect retries, respectively,
  1432. are related. MultiX waits the connect Timeout, to establish a connection over
  1433. the link.  After each connect retry delay, MultiX attempts a new call.  If 
  1434. after the maximum connect retries no connection is established, MultiX 
  1435. stops trying to establish contact.  To attempt contact again, the application 
  1436. has to reopen the link.
  1437.  
  1438. ImAliveInterval, PollInterval and MaxPollRetries
  1439.  
  1440. ImAliveInterval, PollInterval and MaxPollRetries, respectively, are related.  
  1441. MultiX uses these parameters to isolate link failures.  Every 
  1442. ImAliveInterval, MultiX asks the receiving side to verify that it is still 
  1443. receiving.  Every PollInterval MultiX checks internally for unconfirmed 
  1444. frames, and if it finds any asks the receiver to confirm what has been 
  1445. received.  If no confirmation is received after the MaxPollRetries number of 
  1446. retries, MultiX assumes the link to the receiver is no longer working.  If a 
  1447. large poll interval is selected, MultiX takes longer to find link failure.  If a 
  1448. small poll interval is selected, polling interferes with communication.  
  1449. MultiX provides defaults which attempt to balance between these 
  1450. considerations.
  1451.  
  1452. TMdxLinkType Values
  1453.  
  1454. Possible Values of TMdxLinkType            Possible Values of TMdxLinkName
  1455.  
  1456. MdxLinkTypeAsyncLocal                    Async port name.  For example, in
  1457. MdxLinkTypeAsyncModem                    DOS, Windows or OS/2, "COM2".  In
  1458.                                         UNIX "/dev/tty1".
  1459.  
  1460. MdxLinkTypeNetBios                        A Name in the NetBIOS network, such
  1461.                                         as Server 1, Client 1.
  1462.  
  1463. MdxLinkTypeTcpIpSocket                    Name of the host on the TCP/Ip
  1464.                                         network.  This name must be in the
  1465.                                         "hosts" file on the callers machine.
  1466.  
  1467.  
  1468. MdxLinkTypeSpxIpx                        Any valid service name in Netware network.
  1469.  
  1470.  
  1471. TMdxProcessParams Structure
  1472. ---------------------------
  1473.  
  1474. typedef    struct    TMdxProcessParams
  1475. {
  1476.     TMdxProcId        ProcId;
  1477.     TMdxPassword    PasswordToSend;
  1478.     TMdxPassword    ExpectedPassword;
  1479.     TTimer            InactivityTimer;
  1480.     TTimer            ConnectRetriesInterval;
  1481. }    TMdxProcessParams;
  1482.  
  1483.  
  1484. Fields:
  1485.  
  1486. ProcessID                        Any long integer assigned by the
  1487.                                 programmer or system manager to
  1488.                                 identify the process.
  1489.  
  1490. PasswordToSend                    (optional)    See explanation below.
  1491.  
  1492. ExpectedPassword                (optional)    See explanation below.
  1493.  
  1494. InactivityTimer                    When MultiX receives notification
  1495.                                 that the receiving side has
  1496.                                 disappeared MultiX waits the
  1497.                                 duration of the inactivity timer.  If
  1498.                                 the receiving process is recovered
  1499.                                 within this time MultiX begins
  1500.                                 transmitting the message blocks
  1501.                                 from where it was cut off.    If the
  1502.                                 process is not recovered the session
  1503.                                 is ended.  Default: 30 seconds.
  1504.  
  1505. ConnectRetriesInterval            How frequently to check for the
  1506.                                 called process in the network.    The
  1507.                                 search is interrupted when the called
  1508.                                 process is found.
  1509.                                 Default: 10 seconds.
  1510.  
  1511. Passwords
  1512.  
  1513. Passwords are used when the programmer desires a safeguard that the 
  1514. processes communicating are the correct ones.  MultiX automatically sends 
  1515. the passwords when the application calls MdxConncectProcess If the 
  1516. originator's password is acceptable to the receiver, the receiver replies with 
  1517. MdxAcceptProcess. 
  1518. In MultiX it is possible that two processes will both originate a 
  1519. communication.  In this instance, both PasswordsToSend must identically 
  1520. match both ExpectedPasswords.  If the passwords do not match, MultiX 
  1521. will reject the communication without notifying the processes.  If the 
  1522. passwords are correct, MultiX notifies the application, which sends back the 
  1523. MdxConnectProcess call.  Refer to Figure 4.1 
  1524.   
  1525. Figure 4.1    Matching Passwords
  1526.  
  1527. TMdxSRMsgInfo Structure
  1528. -----------------------
  1529.  
  1530. TMdxSRMsgInfo is a structure pointed to by the Data field of the event 
  1531. structure of the message related event, MdxEvDataReplyReceived or, 
  1532. MdxEvSendMsgCompleted.  This structure holds the information relating 
  1533. to the message itself. 
  1534. If a process sends more than one message, MultiX ensures that when 
  1535. responses are received, that the right reply reaches the right message.  
  1536. TMdxSRMsgInfo is used by MultiX to verify that a received response 
  1537. matches the correct message.
  1538.  
  1539.  
  1540. typedef    struct    TMdxSRMsgInfo
  1541. {
  1542.     struct
  1543.     {
  1544.         TMdxMsg            *Msg;
  1545.         TMdxMsgCode        MsgCode;
  1546.         TMdxProcId        SentFrom;
  1547.         TQueueSeq        SenderMsgId;
  1548.         TMdxSendAttr    SendAttr;
  1549.         TMdxMsgPri        MsgPri;
  1550.     }    Received;
  1551.     struct
  1552.     {
  1553.         TMdxMsg            *Msg;
  1554.         TMdxMsgCode        MsgCode;
  1555.     }    Sent;
  1556. }    TMdxSRMsgInfo;
  1557.  
  1558.  
  1559.  
  1560. Fields
  1561.  
  1562. Msg (Received)                    Pointer to the message received.
  1563.  
  1564. MsgCode (Received)                Message code of the response sent.
  1565.  
  1566. SentFrom                        Process ID of the sending process as
  1567.                                 defined in Process Parameters (see Page 4.6).
  1568.  
  1569. SendAttr                        Defines the confirmation required from
  1570.                                 the receiver upon receipt of the
  1571.                                 message.  See Chapter 3 for possible
  1572.                                 values of TMdxMsgAttr.
  1573.  
  1574. MsgPri                            A positive short integer indicating the
  1575.                                 message priority as assigned by the sender.
  1576.  
  1577. Msg (sent)                        Pointer to the original message sent.
  1578.  
  1579. MsgCode (sent)                    Message code of the original message sent.
  1580.  
  1581.  
  1582. TMdxEvent Structure
  1583. -------------------
  1584.  
  1585. typedef    struct    TMdxEvent
  1586. BEGIN
  1587.     TMdxEventCode    Code;
  1588.     TLinkDescr        Ld;
  1589.     TMdxError        Error;
  1590.     TReqSeq            ReqSeq;
  1591.     TMdxProcId        ProcId;
  1592.     Void            *Data;
  1593.     TBufSize        DataCount;
  1594.     TMdxEventHandlerIndex    DataDestructorIndex;
  1595.     TBoolean        KeepEvent;
  1596.     TMdxObjectId    Id;
  1597.     TTimer            EventTimer;
  1598. END    TMdxEvent;
  1599.  
  1600.  
  1601. Fields
  1602.  
  1603.  
  1604. Code                    The code for the event as specified beginning on
  1605.                         page 4.10.
  1606.  
  1607. Ld                        Value returned by MdxOpenLink.    To be used when calling
  1608.                         MdxCheckLinkStatus and MdxCloseLink.
  1609.  
  1610. Error                    Event dependent.  For example, if upon SendComplete
  1611.                         Error is greater than 0, the message was not
  1612.                         successfully sent.    The value of TMdxError explains why.
  1613.  
  1614. ReqSeq                    Optional.  User defined long integer of the type
  1615.                         TReqSeq uniquely identifying the message.  Since the
  1616.                         same message code may be used a number of times, the
  1617.                         request sequence is used to distinguish the message
  1618.                         as unique.
  1619.  
  1620. ProcId                    The process ID of a process with which a session
  1621.                         exists.
  1622.  
  1623. Data                    A void pointer to an event dependent data structure.
  1624.  
  1625. DataSize                Used by MultiX.
  1626.  
  1627. KeepEvent                When the Application's Event Handler is finished,
  1628.                         MultiX destroys data which is part of the event.
  1629.                         If the data should be preserved, set the KeepEvent
  1630.                         flag to True. If KeepEvent is set to True, the
  1631.                         application must later delete the event using
  1632.                         MdxDeleteEvent.
  1633.                         True    =    Keep.
  1634.                         False    =    allows MultiX to delete the event.
  1635.  
  1636.  
  1637. TMdxEventCode Value Codes
  1638. -------------------------
  1639.  
  1640. MdxEvDataMsgReceived            Indicates the arrival of a new message
  1641.                                 received by MultiX to be processed by the
  1642.                                 application. The only field of interest in
  1643.                                 TMdxEvent to the application is "Data".    Data
  1644.                                 points to a structure of the type TMdxSRMsgInfo.
  1645.                                 Using that pointer, the application can retrieve
  1646.                                 information from the message received.
  1647.  
  1648. MdxEvDataReplyReceived            Indicates receipt of a reply from a process
  1649.                                 with which communication is already in progress.
  1650.                                 TMdxSRMsgInfo contains all the information about
  1651.                                 the message that was sent and the reply that was
  1652.                                 received, enabling the application to associate
  1653.                                 the reply with the original message. This event
  1654.                                 also indicates that the other end processed the
  1655.                                 message that was sent and no error occurred so
  1656.                                 the sender can assume successful processing of
  1657.                                 the original message.
  1658.  
  1659. MdxEvSendMsgCompleted            Indicates that a process to which a message was
  1660.                                 sent earlier has been terminated. The error field
  1661.                                 in TMdxEvent indicates whether the message was
  1662.                                 successfully sent or not. Any value other than
  1663.                                 MdErrNoError indicates that the request failed
  1664.                                 either because MultiX could not forward the message
  1665.                                 to its destination or because the other process
  1666.                                 rejected the message with an error reply. The
  1667.                                 Error explains why the send failed.    "Data" points
  1668.                                 to a structure of the type TMdxSRMsgInfo. Using
  1669.                                 that pointer, the application can retrieve information
  1670.                                 from the message received.
  1671.  
  1672. MdxEvCallReqReceived            Indicates that another process is trying to establish
  1673.                                 a session with the receiving process.  "ProcId"
  1674.                                 in TMdxEvent holds the MultiX Id of the calling
  1675.                                 process, "Data" points to TMdxPassword.
  1676.  
  1677. MdxEvCallRejected                Indicates that the called process has refused
  1678.                                 a call, and there is no way to establish a session
  1679.                                 with that process.    The error field contains the
  1680.                                 reason for rejection, as set by the called process
  1681.                                 responding with MdxRejectProcess.
  1682.  
  1683. MdxEvCallCompleted                Indicates that a session was established between
  1684.                                 the calling process and the process indicated
  1685.                                 by "ProcId" in TMdxEvent. This means that data
  1686.                                 transfer can take place.
  1687.  
  1688. MdxEvProcessReady                When a process with which a session exists changes
  1689.                                 states from not ready to ready, a MdxEvProcessReady
  1690.                                 event is generated.    The ProcID field in TMdxEvent
  1691.                                 indicates the subject of the event.
  1692.  
  1693. MdxEvProcessNotReady            When a process with which a session exists changes
  1694.                                 states from ready to not ready, a MdxEvProcessNotReady
  1695.                                 event is generated.    The ProcID field in TMdxEvent
  1696.                                 indicates the subject of the event.
  1697.  
  1698. MdxEventApplInit                An application may not call any MultiX routines
  1699.                                 before it calls MultiXStart. Once MultiX finishes
  1700.                                 its initialization it invokes the application's
  1701.                                 event handler with event code of MdxEventApplInit.
  1702.                                 That indicates to the application that it can
  1703.                                 call any MultiX routine.
  1704.  
  1705. MdxTimerEvent                    Each time an application timer expires, MultiX
  1706.                                 invokes the application's event handler with
  1707.                                 MdxTimerEvent. Access information about the timer
  1708.                                 using the data field in TMdxEvent.
  1709.  
  1710. MdxLinkMgrEvLinkStatus            When a link previously opened with MdxOpenLink
  1711.                                 changes state, a MdxLinkMgrEvLinkStatus event
  1712.                                 is generated. An event of this type is generated
  1713.                                 when the IdleTimeout or MaxConnectRetries fields
  1714.                                 in TMdxLinkParams are reached. The Data    field
  1715.                                 in TMdxEvent points to a structure of the type
  1716.                                 TMdxLinkParams passed by the application to
  1717.                                 MdxOpenLink. This event occurs only if MdxReportAllLinks
  1718.                                 is set in MultiXStart.
  1719.                                 The Error field in TMdxEvent indicates the current
  1720.                                 state of the link.
  1721.                                 MdErrNoError            -    the link is ready.
  1722.                                 MdErrLinkDisconnected    -    the link is broken.
  1723.                                                             MultiX will try to
  1724.                                                             reestablish contact.
  1725.                                 MdErrLinkClosed         -    the link is broken.
  1726.                                                             MultiX will not try to
  1727.                                                             reestablish contact.
  1728.  
  1729. MdxProcMgrEvProcessAdded        When a process in the network changes states from
  1730.                                 not ready to ready, a MdxProcMgrEvProcessAdded
  1731.                                 event is generated.    The ProcID field in TMdxEvent
  1732.                                 indicates the subject of the event.
  1733.  
  1734. MdxProcMgrEvProcessRemoved        When a process in the network changes states from
  1735.                                 ready to not ready, a MdxProcMgrEvProcessRemoved
  1736.                                 event is generated. The ProcID field in TMdxEvent
  1737.                                 indicates the subject of the event.
  1738.  
  1739.  
  1740. TMdxApplTimerInfo Structure
  1741. ---------------------------
  1742.  
  1743. typedef    struct    TMdxApplTimerInfo
  1744. {
  1745.     TTimerId        TimerId;
  1746.     Int16            Code;
  1747.     TTimer            Timer;
  1748.     TTimerTag        Tag1;
  1749.     TTimerTag        Tag2;
  1750.     TTimerTag        Tag3;
  1751.     TCounter        Count;
  1752. }    TMdxApplTimerInfo;
  1753.  
  1754. Fields
  1755.  
  1756. TimerId             Returned by MultiX when calling MdxSetApplTimer(). Each
  1757.                     timer has its own Id which can be used later to clear the
  1758.                     timer using MdxClrTimer().
  1759.  
  1760. TimerCode            Timer code. Used to classify the timer, just as a MultiX
  1761.                     message code classifies a message.    See Chapter 3 for more
  1762.                     information about MultiX message codes.
  1763.  
  1764. Timer                Amount of time to allocate before the timer expires.
  1765.  
  1766. Tag                    One of three 32 bit user defined variables.    These may be
  1767.                     used to provide additional information about the timer.
  1768.                     For example, one tag may be a process ID, another a message
  1769.                     code, and the third a link code.
  1770.  
  1771. Counter                The number of times to apply the timer.    For example, if
  1772.                     Timer is 1000, and Counter is 10, MultiX applies a
  1773.                     ten second timer ten times.
  1774.